package com;

import com.bean.My;
import com.config.App;
import com.service.MyService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import redis.clients.jedis.Jedis;

/**
 * @author: 一个小菜逼
 * @Date: 2020/4/28
 */
public class SpringApplication {

    public static void main(String[] args) {
        //普通的spring的IOC容器
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext();
        ac.register(App.class);
        ac.refresh();
        Jedis jedis = (Jedis)ac.getBean("jedis");
        System.out.println(jedis.ping());

//        My my = (My)ac.getBean("getInstanceMy");
//        System.out.println(my);
//        MyService myService = (MyService)ac.getBean("myService");
//        myService.test();

    }

}
